#ifndef USER_H
#define USER_H

#include <string>
#include <stdint.h>

class User
{
public:
	User( const std::string username, const std::string password );
	~User();

	inline std::string GetUsername(){ return( mUsername ); }
	inline std::string GetPassword(){ return( mPassword ); }
  // Get the user id for this user
  inline uint32_t GetUserId ()    { return mUserId ; } 

	bool ValidUserName( const std::string username );
	bool ValidPassword( const std::string password );
	inline void IncrementFailedLoginAttemps(){ ++mInvalidLoginCount; }
	inline void ResetFailedLoginAttempts(){ mInvalidLoginCount = 0; }
	inline unsigned int GetFailedLoginAttempts(){ return( mInvalidLoginCount ); }
  
  // Get the next ID in the unique id sequence.
  uint32_t GetNextUserId () ;
  
private:
	// Prevent copy construction and assignment
  User(const User&);
  User& operator=(const User&);

	std::string  mUsername;
	std::string  mPassword;
	unsigned int mInvalidLoginCount;
  uint32_t     mUserId ;
    
  static uint32_t s_mNextUserId ;
  
};

#endif
